{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# How BrainPy Works"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Desgin philosophy"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The goal of ``BrainPy`` is to provide a highly flexible and\n",
    "efficient neural simulator for Python users. Specifically,\n",
    "several principles are kept in mind during the development of BrainPy.\n",
    "\n",
    "- **Easy to learn and use**.\n",
    "  The aim of BrainPy is to accelerate your reaches on neuronal dynamics modeling.\n",
    "  We don't want BrainPy make you pay much time on the learning of how to code. \n",
    "  On the contrary, all you need is to focus on the implementation logic\n",
    "  of the network model by using your familiar [NumPy](https://numpy.org/doc/stable/)\n",
    "  APIs. Although you've never used NumPy, even you are unfamiliar with Python, using\n",
    "  BrainPy is also a easy thing. This is because the\n",
    "  [Python](https://www.w3schools.com/python/) and [NumPy](https://numpy.org/doc/stable/) \n",
    "  syntax is simple, elegant and human-like.\n",
    "\n",
    "- **Flexible and Transparent**.\n",
    "  Another consideration of BrainPy is the flexibility. \n",
    "  Traditional simulators with [code generation](https://www.frontiersin.org/articles/10.3389/fninf.2018.00068/full) \n",
    "  approach (such as Brain2 and ANNarchy) \n",
    "  have intrinsic limitations. In order to generate efficient low-level (such as c++) codes, \n",
    "  these simulators make assumptions for models to simulate, and require users to \n",
    "  provide string descriptions to define models. Such string descriptions greatly reduce\n",
    "  the programming capacity. Moreover, there will always be exceptions beyond the \n",
    "  framework assumptions, such as the data or logical flows that the framework do not \n",
    "  consider before. Once such frameworks are not tailored to the user needs, extensions \n",
    "  becomes difficult and even impossible. Furthermore, no framework is immune to errors when dealing with\n",
    "  user's incredible models (even the well-tested framework \n",
    "  [TensorFlow](https://www.reddit.com/r/MachineLearning/comments/hrawam/d_theres_a_flawbug_in_tensorflow_thats_preventing/)). \n",
    "  Therefore, making the\n",
    "  framework transparent to users becomes indispensable. Considering this, \n",
    "  BrainPy enables the users to directly modify the final formatted code once some errors are \n",
    "  found (see examples comming soon). \n",
    "  Actually, BrainPy endows the users with the fully data/logic flow control.  \n",
    "  It is concise and powerful, and there is no secrets for users.\n",
    "  \n",
    "- **Efficient**.\n",
    "  The final consideration of BrainPy is to accelerate the running speed of\n",
    "  of your coded models. In order to achieve high efficiency, we incorporate several \n",
    "  Just-In-Time compilers (now support Numba, future will support JAX and others) \n",
    "  into BrainPy. Moreover, an unified NumPy-like API are provided for these compilers. \n",
    "  The aim of the API design is to let the user *code once and run everywhere*\n",
    "  (the same code runs on CPU, multi-core, GPU, OpenCL, etc.).\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "hide_input": false,
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
